<template>
  <div>
    <HomeTypeHeader :icon-left="iconLeft"></HomeTypeHeader>
    <Swiper :all-list="allList"></Swiper>
  </div>
</template>

<script>
import HomeTypeHeader from "@/utils/common/HomeTypeHeader";
import Swiper from "@/utils/common/Swiper";

export default {
  name: "EatHeader",
  components: {Swiper, HomeTypeHeader},
  data() {
    return {
      iconLeft: '\ue60d',
      allList: [],
      foodList: []
    }
  },
  mounted() {
    this.getEatSwiper();
  },
  methods: {

    getEatSwiper() {
      this.getRequest("/home/eat/list").then(res => {
        this.allList = res.data.slice(0, 2);
        // this.foodList = res.data.slice(2, 7);
        // this.$emit('setFoodList', this.foodList)
      })
    },
  }
}
</script>

<style scoped>

</style>